package com.panda.utils;

import com.panda.pojo.Context;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

class ViewUtils {

    private static Pattern pattern = Pattern.compile(" *@View[ \n]*");

    static void isView(Context context) {

        String text = context.getText();

        Matcher matcher = pattern.matcher(text);

        while (matcher.find()) {
            text = text.replace(matcher.group(), "");

            context.setView(true);
        }

        context.setText(text);

    }
}
